package com.financial.service.task.Jobs;


import com.financial.service.task.connector.HeemoneyFeign;
import com.financial.service.task.utils.DateFormatHelper;
import com.financial.service.task.utils.apiresult.ApiResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class HeemoneyJob {

    private static Logger log = LoggerFactory.getLogger(HeemoneyJob.class);

    @Autowired
    private HeemoneyFeign heemoneyFeign;
    @Async
    @Scheduled(cron = "0 0 0/1 * * ?")
    public ApiResult reportTask(){

        log.info(DateFormatHelper.getNowTimeStr()+"=========查询商户进件状态==========");
        return heemoneyFeign.reportTask();

    }
}
